<script setup>
import {
  onLoad,
} from '@dcloudio/uni-app'
import {
  onBeforeUnmount,
} from 'vue'

const listenMess = (e) => {
  console.info(e)
}
onLoad(() => {
  // #ifdef H5
  window.addEventListener('message', listenMess, false)
  // #endif
})
onBeforeUnmount(() => {
  // #ifdef H5
  window.removeEventListener('message', listenMess)
  // #endif
})
</script>

<template>
  <view>
    <web-view src="http://localhost:3600/uniapp" @message="listenMess" />
  </view>
</template>

<style lang="scss" scoped>

</style>
